﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user/login',
        layout: false,
        name: 'login',
        component: './user/Login',
      },
      {
        path: '/user',
        redirect: '/user/login',
      },
      {
        component: '404',
      },
    ],
  },
  {
    path: '/dashboard',
    name: '看板',
    icon: 'dashboard',
    routes: [
      {
        path: '/dashboard',
        redirect: '/dashboard/analysis',
      },
      {
        name: '数据大盘',
        path: '/dashboard/analysis',
        component: './dashboard/analysis',
      },
      // {
      //   name: '用户分析',
      //   path: '/dashboard/user-analysis',
      //   component: './dashboard/user-analysis',
      // },
    ],
  },
  {
    path: '/wechat',
    icon: 'wechat',
    name: '微信配置',
    routes: [
      {
        path: '/wechat',
        redirect: '/wechat/wx-code-config',
      },
      {
        name: '企业微信',
        path: '/wechat/wx-code-config',
        component: './wechat/wx-code-config',
      },
      {
        name: '小程序',
        path: '/wechat/mp-config',
        component: './wechat/mp-config',
      },
    ],
  },
  {
    path: '/task',
    icon: 'schedule',
    name: '营销任务',
    routes: [
      {
        path: '/task',
        redirect: '/task/task-list',
      },
      {
        name: '任务列表',
        path: '/task/task-list',
        component: './task/task-list',
      },
    ],
  },
  {
    path: '/policy',
    icon: 'user',
    name: '权限控制',
    routes: [
      {
        path: '/policy',
        redirect: '/policy/admin-list',
      },
      {
        name: '管理员',
        path: '/policy/admin-list',
        component: './policy/admin-list',
      },
    ],
  },
  {
    path: '/',
    redirect: '/dashboard/analysis',
  },
  {
    component: '404',
  },
];
